<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	//初始化表单验证
	$("#editForm").validate({
		
		/*  rules : {
			 authority : {
					digits : true
				},
			recommend : {
					digits : true
				},
			},
 */
		messages : {
			recommend : {
				required : "请输入是否推荐"
			},
			authority : {
				required : "请输入权限"
			}

		},
		submitHandler : function(form) {
			$(form).ajaxSubmit({
				success : function(data) {
					switch (data.flag) {
					case -1:
						Kit.alert("网络繁忙...，请重试");
						return;
					case 1:
						kit.alert("权限代码有误");
						return;
					case 0:
						editDialog.close();
					}
				}
			});
		}
	});
</script>
<form id="editForm" action="${BASE_PATH}/spike/recommend/doEdit"
	method="post" class="form-horizontal">
	<div class="form-group">
		<label class="col-lg-2 control-label">是否推荐</label>
		<div class="col-lg-9">
			<select name="recommend" class="selectpicker form-control">
				<option value="1"
					<c:if test="${object.recommend==1}">data-dropdown-selected="true"</c:if>>推荐</option>
				<option value="0"
					<c:if test="${object.recommend==0}">selected</c:if>>不推荐</option>
			</select>
		</div>
	</div>
	<%-- <div class="form-group">
		<label class="col-lg-2 control-label">状态</label>
		<div class="col-lg-9">
			<input type="text" name="state" value="${object.state }" class="form-control" placeholder="请输入状态信息">
		</div>
	</div> --%>
	<%-- <div class="form-group">
		<label class="col-lg-2 control-label">权限</label>
		<div class="col-lg-9">
			<input type="text" name="authority" class="form-control"
				placeholder="请输入权限信息" value="${object.authority }">
		</div>
	</div> --%>

	<div class="row">
		<div class="col-lg-6">
			<button class="btn btn-primary col-sm-3 pull-right" type="submit"
				autocomplete="off">提交</button>
		</div>
		<div class="col-lg-6">
			<button class="btn btn-default col-sm-3 pull-left" type="button"
				onclick="javascript:editDialog.close();" autocomplete="off">取消</button>
		</div>
	</div>
	<input type="hidden" name="id" value="${object.id}" />

</form>